package org.example.collectionobject;

import java.util.*;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.locks.Lock;

public class CollectioList {

    public static void main(String[] args) throws InterruptedException {

        // list
        List<Integer> list= new ArrayList<>(10);
        list.add(1);
        list.add(2);
        list.add(3);
        list.add(4);
        list.add(5);
        list.add(6);
        list.add(7);
        System.out.println("args3 = " + list.size());
    // remove 清理
        for (int i = 0; i < list.size(); i++) {

            list.remove(3);
            list.remove(4);

        }
        System.out.println("args = " + list.size());

        CountDownLatch countDownLatch = new CountDownLatch(10);

        countDownLatch.countDown();

        countDownLatch.await();


//        List list2= new Vector<>();
//        List list3= new LinkedList();
//
//        // map
//        Map map = new HashMap();
        Map map2 = new Hashtable();
//        Map map3 = new TreeMap();
//
//        //set
//        Set set = new HashSet();
//        Set set2 = new TreeSet();
//        Set set3= new LinkedHashSet();
//        Integer integer = new Integer(4);

//        list3.remove(1);
    }
}
